import request from '@/utils/request'

/**
 * @description 登录接口
 * @param {mobile,passwrod} data number number
 * @returns
 */
export function login(data) {
  return request({
    url: '/sys/login',
    method: 'POST',
    data
  })
}
/**
 * @description 获取用户资料接口
 * @param {*} token
 */
export function getUserProfile() {
  return request({
    url: '/sys/profile',
    method: 'POST'
  })
}
/**
 * @description: 获取员工详情
 * @param {*} id 用户id
 * @return {*}
 */
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'GET'
  })
}
/**
 * @description: 更新员工信息
 * @param {*} data
 * @return {*}
 */
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
export function getInfo(token) {

}

export function logout() {

}
